package cf.huzpsb.bcgod;

import net.md_5.bungee.api.connection.ProxiedPlayer;

import java.util.Iterator;

public class TimeTasker implements Runnable {
    @Override
    public void run() {
        String[] lst = Main.Announce.split(";");
        int i = 0;
        while (true) {
            i++;
            if (i >= lst.length) {
                i = 0;
            }
            try {
                Thread.sleep(Main.delay * 1000);
            } catch (Exception e) {
                e.printStackTrace();
            }
            Iterator var17 = Main.getInstance().getProxy().getPlayers().iterator();

            while (var17.hasNext()) {
                ProxiedPlayer player1 = (ProxiedPlayer) var17.next();
                player1.sendMessage(lst[i]);
            }
        }
    }
}


